In a computer system, hardware virtualization abstracts away low-level details of hardware of the computer system from users, instead presenting a virtual computing platform whose resources can be used. Typically, input devices, output devices, network adapters, and other hardware devices of the computer system are presented as logical abstractions in the virtual platform. Processing units, memory, storage of the computer system are similarly hidden from users. In many common configurations, the computer system supports multiple partitions. In a host (parent or root) partition, a host controls how the virtual platform is used in one or more guest (child) partitions. In a guest partition, the host creates a simulated computer environment—a virtual machine (“VM”)—in which guest software executes. A guest OS can be installed in the VM, using the virtualized resources of the virtual platform, and applications can execute in conjunction with the guest OS in the VM. The guest OS and applications in the VM execute as if running directly on physical hardware, albeit with some restrictions on access to system resources. The host can access hardware resources of the computer system. When a guest OS or application in a VM uses virtualized resources, the host can mediate access to the hardware resources of the computer system. This prevents guest software from misusing or overusing system resources such as network access, storage, memory, and processing units.
A virtual platform can hide details of a physical network adapter used to access a network. Instead, guest software in a guest partition connects to the network through a virtual networking layer. In a physical network, a network switch has multiple ports and routes traffic from any one port of the network switch to any other port of the network switch. Analogously, a virtual networking layer can include a virtual switch, which is able to route traffic from any one port of the virtual switch to any other port of the virtual switch. In a typical configuration, one of the ports of the virtual switch is connected to a physical network adapter (that is connected to an external network), and other ports of the virtual switch are connected to VMs. The virtual switch allows one physical network adapter to provide network connectivity to an arbitrary number of VMs. The virtual switch can also connect to a host.
From time to time, a virtual switch is updated or otherwise changed. In order to swap versions of the virtual switch, connections to the virtual switch are disconnected or disabled. In practice, changing versions of a virtual switch can involve (1) disabling a physical network adapter for a host, (2) disabling virtual network adapters for VMs, (3) disabling a virtual network adapter for the host, (4) unloading the previous version of the virtual switch from memory, (5) loading a current version of the virtual switch into memory, (6) restoring/enabling the physical network adapter for the host, (7) restoring/enabling the virtual network adapters for VMs, and (8) restoring/enabling the virtual network adapter for the host. Disabling a physical or virtual network adapter can tear down a network connection used by the host or a VM. This may cause an application running on the host or VM to stop, or otherwise cause disruption to the application as the host or VM manages the loss and recovery of the network connection. The state of a VM may need to be saved then restored, or an application may need to be restarted, potentially resulting in significant downtime, loss of correct application state, and/or loss of data. In particular, loss of functionality for applications running on the host (e.g., to monitor VMs, perform diagnostic tests, or track which applications running on the host or VMs are active) can result in significant downtime and revenue loss for a cloud service provider, which may host commercial Web services or critical infrastructure services for a business or other organization. Even if the loss of network connections for the host and VMs is managed gracefully, network connectivity for the host and VMs is interrupted during the process of servicing the virtual switch. The consequences of virtual switch servicing can be a significant problem for cloud service providers. According to terms of a service agreement, a cloud service provider may be required to offer steep discounts or pay refunds if network connectivity is interrupted for longer than a minimal duration.